package com.zzy.web.controller.purchase;

import com.zzy.common.core.domain.AjaxResult;
import com.zzy.system.service.IPurchaseRefundOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.sql.BatchUpdateException;

/**
 * 采购退货订单
 * 
 * @author zzy
 */
@Api(value = "Order", tags = {"采购退货订单"}, hidden = false)
@RestController
public class PurchaseRefundOrderController
{
    @Autowired
    private IPurchaseRefundOrderService iPurchaseRefundOrderService;

    @GetMapping("/getGuanmaiPurchaseRefundOrderList")
    @ApiOperation("获取观麦采购退库单")
    public AjaxResult getGuanmaiPurchaseRefundOrderList(@RequestParam(value = "status",defaultValue = "3") Integer status,
                                                     @RequestParam("startDate") String startDate,
                                                     @RequestParam("endDate") String endDate,
                                                     @RequestParam(value = "offset",defaultValue = "0") Integer offset,
                                                     @RequestParam(value = "limit",defaultValue = "100") Integer limit,
                                                     @RequestParam(value = "searchType",defaultValue = "1") Integer searchType
                                                     ) throws IOException, BatchUpdateException {
        AjaxResult ajax = AjaxResult.success();
        iPurchaseRefundOrderService.getGuanmaiPurchaseRefundOrderList(status, startDate, endDate, offset, limit,searchType);
        return ajax;
    }


}
